import i18n from '@src/locales';
import SignOperatorEnum from '../BaseCalculationFormula/SignOperatorEnum'

const FormulaFuncTipEum = {
  ADD: i18n.t('common.form.preview.forMula.formulaFuncTipEum.add'),
  AVERAGE: i18n.t('common.form.preview.forMula.formulaFuncTipEum.average'),
  SUM: i18n.t('common.form.preview.forMula.formulaFuncTipEum.sum'),
  PRODUCT: i18n.t('common.form.preview.forMula.formulaFuncTipEum.product'),
  MAX: i18n.t('common.form.preview.forMula.formulaFuncTipEum.max'),
  MIN: i18n.t('common.form.preview.forMula.formulaFuncTipEum.min'),
};

const SignOperators =  [
  SignOperatorEnum.Add,
  SignOperatorEnum.Subtract,
  SignOperatorEnum.Multiply,
  SignOperatorEnum.Divide,
  SignOperatorEnum.LeftBracket,
  SignOperatorEnum.RightBracket
]
interface CalculationFormulaItem {
  fieldName: string;
  parentFieldName: string;
  formType: string,
  displayName: string,
  value: string;
  isOperator?: boolean;
  isDelete?: boolean;
  isError?: boolean;
  tableName?: string;
}

export {
  SignOperatorEnum,
  FormulaFuncTipEum,
  CalculationFormulaItem,
  SignOperators
}